@import '../Shared/_variables.scss';

.leftNav {
  background-color: $lighter-blue;
  border-right: 1px solid $light-blue;
  height: 100%;
  font-size: 16px;
  line-height: 1.5em;
  padding: 32px 8px 8px 20px;
  .active.root > .parent.currentUrl {
    background-color: inherit;
    color: inherit;
    padding-left: 70px;
  }
  .root > .parent{
    button {
      font-weight: 700;
    }
  }
  .parent {
    list-style-type: none;
    margin-left: -10px;
    .caret {
      position: relative;
      top: 14px;
      left: -8px;
      transition: transform .2s ease;
      -webkit-transform: rotate(-90deg);
      -moz-transform: rotate(-90deg);
      -o-transform: rotate(-90deg);
      -ms-transform: rotate(-90deg);
      transform: rotate(-90deg);
      

      &.active-caret {
        transition: transform .2s ease;
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
      }
    }

    & button {
      background: none;
      color: inherit;
      border: none;
      padding: 0;
      font: inherit;
      cursor: pointer;
      outline: inherit;
      text-transform: capitalize;
    }

    &.currentUrl {
      background-color: $postman-orange;
      color: $white;
      margin: 0 -8px 16px -80px;
      padding: 8px 0 8px 70px;
    }
  }

  .child {
    margin-left: 28px;
    margin-bottom: 24px;

    &.currentUrl{
      font-weight: 700;
      margin-left: 23px;

      .activeIndicator {
        min-width: 5px;
        height: 1.5em;
        display: inline-block;
        background-color: $postman-orange;
        position: relative;
        left: -10px;
        top: 5px;
      }
    }

    a {
      text-decoration: none;
      color: inherit;
    }
  }

  ul.active > .child, ul.active > .parent, ul.active > ul.inactive, ul.inactive.root {
    display: block; 
  }

  ul.inactive > .child, ul.inactive > ul {
    display: none;
  }
}
